/*server.c*/
#include<stdio.h>
#include<stdlib.h>
#include<sys/stat.h>
#include<unistd.h>
#include<linux/stat.h>
#define FIFO_S "serget"
#define FIFO_C1 "serput1"
#define FIFO_C2 "serput2"
int main()
{
    FILE *fp,*fp1,*fp2;
    char readbuf[50];
    char writebuf[50];
    while(1)
    {
         if((fp=fopen(FIFO_S,"r"))==NULL)
         {
             printf("open fifo failed.\n");
             exit(1);
         }
         if(fgets(readbuf,50,fp)!=NULL)
         {
             printf("Received string:%s\n",readbuf);
             fclose(fp);
         }
         else
         {
              if(ferror(fp))
              {
                   printf("read fifo failed.\n");
                   exit(1);
              }
          }
 //        if((fp=fopen(
     }
     return 0;
}
